<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Cache;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $this->success('请求成功');
    }


    public function test() {
        //phpinfo();
//        echo shell_exec("id -a");
//
//       // exec("which php  2>&1", $out, $status);
//        //exec("/usr/local/php/bin/php /usr/local/php/bin/index.php  2>&1", $out, $status);
//        exec("/usr/local/node/bin/node -v 2>&1", $out, $status);
//        var_dump($out);
//        halt($status);
        Cache::store('redis')->clear();
    }


}
